// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.InventoryFlow;
import com.fowo.api.model.inventory.flow.InventoryFlowItemVo;
import com.fowo.api.model.inventory.flow.InventoryFlowItemVo;
import com.fowo.api.model.inventory.flow.InventoryFlowSearchParamPo;
import com.fowo.api.model.inventory.flow.InventoryFlowSearchParamPo;
import com.fowo.api.model.inventory.flow.InventoryFlowVo;
import com.fowo.api.model.position.flow.PositionFlowItemVo;
import com.fowo.api.model.position.flow.PositionFlowSearchParamPo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface InventoryFlowMapper extends BaseMapper<InventoryFlow> {
  Page<InventoryFlowItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") InventoryFlowSearchParamPo search
  );
  List<OptionItem<InventoryFlowItemVo>> searchOptions(
    @Param("search") InventoryFlowSearchParamPo search
  );
  List<InventoryFlowItemVo> search(
    @Param("search") InventoryFlowSearchParamPo search
  );
  Date searchLastUpdateTime(@Param("search") InventoryFlowSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") InventoryFlowSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") InventoryFlowSearchParamPo search);
  Long getIdByNum(@Param("num") String num);

  List<Long> getIdsByNum(@Param("list") List<String> list);

  String getNumById(@Param("id") Long id);

  List<Map<String, Object>> getNumByIds(@Param("ids") List<Long> ids);
  InventoryFlowVo selectVoById(@Param("id") Long id);
  /**
   * 仓库流水
   */
  List<InventoryFlowItemVo> wareroomFlow(
    @Param("search") InventoryFlowSearchParamPo search
  );

  /**
   * 仓库流水分页
   */
  Page<InventoryFlowItemVo> wareroomFlowPage(
    @Param("page") Page page,
    @Param("search") InventoryFlowSearchParamPo search
  );
  /**
   * 仓库流水最后更新时间
   */
  Date wareroomFlowLastUpdateTime(
    @Param("search") InventoryFlowSearchParamPo search
  );
  /**
   * 仓位流水
   */
  List<PositionFlowItemVo> warepositionFlow(
    @Param("search") PositionFlowSearchParamPo search
  );

  /**
   * 仓位流水分页
   */
  Page<PositionFlowItemVo> warepositionFlowPage(
    @Param("page") Page page,
    @Param("search") PositionFlowSearchParamPo search
  );
  /**
   * 仓位流水最后更新时间
   */
  Date warepositionFlowLastUpdateTime(
    @Param("search") PositionFlowSearchParamPo search
  );
}
